
import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: () => import('@/views/Layout/LayoutView.vue'),
      redirect: '/home',
      children: [{
        path: 'home',
        name: 'home',
        component: () => import('@/views/Home/HomeView.vue')
      },
      {
        path: 'cart',
        name: 'cart',
        component: () => import('@/views/Cart/CartView.vue')
      },
      {
        path: 'order',
        name: 'order',
        component: () => import('@/views/Order/OrderView.vue')
      },
      {
        path: 'my',
        name: 'my',
        component: () => import('@/views/My/MyView.vue')
      }]
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('@/views/Login/LoginView.vue')
    },
    {
      path: '/shop',
      name: 'shop',
      component: () => import('@/views/Shop/ShopView.vue')
    },
    {
      path: '/orderconfirmation',
      name: 'orderconfirmation',
      component: () => import('@/views/Order/OrderView.vue')
    },
    {
      path: '/address',
      name: 'address',
      component: () => import('@/views/Address/AddressView.vue')
    },
    {
      path: '/createaddress',
      name: 'createaddress',
      component: () => import('@/views/Address/CreateAddressView.vue')
    }
  ]
})
export default router
